﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using DevExpress.Xpo;
using Component;

public partial class SanPhamCungLoai_SPCungLoai : System.Web.UI.UserControl
{
    protected XPCollection<Product> _xpProduct = null;
    //protected string _Products = "";
    //protected int _pagemax = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        _xpProduct = new XPCollection<Product>(KetNoiCSDL.session);
        int idProduct = ConvertType.ToInt(QueryHelper.GetQueryString(Request, ConstString._id));
        _xpProduct = ProductDB.LayTatCaCacSPCungLoai(idProduct);
        //foreach (Product pro in _xpProduct)
        //{
        //    _Products += string.Format("{0},{1};", pro.Img, pro.UrlDetailFronent);
        //}
        //_Products = _Products.Substring(0, _Products.Length - 1);
        //_Products += "";
        //_pagemax = _xpProduct.Count % 4 == 0 ? (_xpProduct.Count / 4) : ((_xpProduct.Count / 4) + 1);
    }
}
